package site.edody.dframe.rocketmq;


import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
import java.util.Map;

@ConfigurationProperties(prefix = "dframe.rocketmq")
public class RocketMQProperties {


    private String nameServer;
    private Map<String, ProducerConfig> producers;
    private Map<String, ConsumerConfig> consumers;


    public static class ProducerConfig {
        private String group;
        private List<String> topics;

        public String getGroup() {
            return group;
        }

        public void setGroup(String group) {
            this.group = group;
        }

        public List<String> getTopics() {
            return topics;
        }

        public void setTopics(List<String> topics) {
            this.topics = topics;
        }
    }

    public static class ConsumerConfig {
        private String group;
        private String topic;
        private List<String> tags;

        public String getGroup() {
            return group;
        }

        public void setGroup(String group) {
            this.group = group;
        }

        public String getTopic() {
            return topic;
        }

        public void setTopic(String topic) {
            this.topic = topic;
        }

        public List<String> getTags() {
            return tags;
        }

        public void setTags(List<String> tags) {
            this.tags = tags;
        }
    }


    public String getNameServer() {
        return nameServer;
    }

    public void setNameServer(String nameServer) {
        this.nameServer = nameServer;
    }

    public Map<String, ProducerConfig> getProducers() {
        return producers;
    }

    public void setProducers(Map<String, ProducerConfig> producers) {
        this.producers = producers;
    }

    public Map<String, ConsumerConfig> getConsumers() {
        return consumers;
    }

    public void setConsumers(Map<String, ConsumerConfig> consumers) {
        this.consumers = consumers;
    }
}